package android.cs2340UDT;

import java.util.regex.Pattern;

/*
 * Class manages the map class by setting the name, state, city, street, and zipCode
 */
public class Map {
	public String name, state, city, street, zipCode;
	
	public Map(String name, String state, String city, String street, String zipCode){
		
	}
	
	/*
	 * Method sets the name
	 * @param name the name of the location
	 */
	public void setName(String name){
		
	}
	
	/*
	 * Method sets the State
	 * @param state the state in the address
	 */
	public void setState(String state){
		
	}
	
	/*
	 * Method sets the City
	 * @param city the city in the address
	 */
	public void setCity(String city){
		
	}
	
	/*
	 * Method sets the Street
	 * @param street the street in the address
	 */
	public void setStreet(String street){
		
	}
	
	/*
	 * Method sets the zipCode
	 * @param zipCode the zipCode in the address
	 */
	public void setZip(String zipCode){
		
	}
	
	/*
	 * Method returns the name of the location
	 * @return the string of the name
	 */
    public String getName(){
    	return "";
	}
	
    /*
	 * Method returns the state of the location
	 * @return the string of the state
	 */
	public String getState(){
		return "";
	}
	
	/*
	 * Method returns the city of the location
	 * @return the string of the city
	 */
	public String getCity(){
		return "";
	}
	
	/*
	 * Method returns the street of the location
	 * @return the string of the street
	 */
	public String getStreet(){
		return "";
	}
	
	/*
	 * Method returns the zipCode of the location
	 * @return the string of the zipCode
	 */
	public String getZip(){
		return "";
	}
	
	/*
	 * @param address the address
	 * @return true, if successful
	 */
	public static boolean testAddress(String address){
		Pattern p = Pattern.compile("[0-9]{1,5} (\\w| |\\.|-)*\n[A-Z](\\w| |\\.|-)*, [A-Z]{2} [0-9]{5}");
		return p.matcher(address).matches();
	}


}
